/**
 * 视频详情页面
 */
define(function(require,exports,module) {
    var myPub = require('./public');
    var myVideoPlay = require('./videoConfig');

    module.exports = {
        init: function(data,names) {
            videoDetail.SetAdsLiScroll();
            myVideoPlay.videoSet('js_videoPlay');
        }
    };

    var videoDetail = {
        // 设置滚动广告
        SetAdsLiScroll: function () {
            var oHScrollBox = $('.js_WScroll');
            var oSlideAdsScroll = [];

            oHScrollBox.each(function (i) {
                oSlideAdsScroll[i] = oHScrollBox.eq(i).swiper({
                    freeMode: true,
                    freeModeMomentumRatio: 0.5,
                    lazyLoading: true,
                    watchSlidesProgress: true,
                    watchSlidesVisibility : true,
                    slideClass : 'slide-HScroll',
                    slidesPerView : 'auto',
                    observer: true,
                    observeParents: true,
                    onSlideChangeEnd:function (swiper) {
                        var index = swiper.activeIndex;
                    }
                });
            });

            // 设置app产品跳转链接
            myPub.JudgeAppHref(oHScrollBox.find('.js_appHref'));
        },
    }
});